package com.pactera.jep.service.sys.conf.properties;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Ftp相关配置属性
 * @author ghost
 *
 */
@Component
@ConfigurationProperties("ftp")
@ConditionalOnProperty(name="save.type", havingValue="FTP")
public class FtpProperties {
	
	/**
	 * Ftp地址
	 */
	private String host;
	
	/**
	 * Ftp端口，默认21
	 */
	private int port = 21;
	
	/**
	 * Ftp用户名
	 */
	private String username;
	
	/**
	 * Ftp密码
	 */
	private String password;
	
	/**
	 * 工作目录
	 */
	private String workDir;
	
	/**
	 * 服务器字符集，默认是UTF-8
	 */
	private String encoding = "UTF-8";
	
	/**
	 * 是否在workDir不存在的时候创建此目录，默认为true
	 */
//	private boolean createIfWorkDirNotExist = true;

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getWorkDir() {
		return workDir;
	}

	public void setWorkDir(String workDir) {
		this.workDir = workDir;
	}

	public String getEncoding() {
		return encoding;
	}

	public void setEncoding(String encoding) {
		this.encoding = encoding;
	}

}
